'use strict';
const db = uniCloud.database();
exports.main = async (event, context) => {
	//获取数据表
	const collection = db.collection("label");
	//event为客户端上传的参数
	console.log('event : ', event)
	//查询
	const res = await collection.get();
	//返回数据给客户端
	return {
		code:200,
		data:res.data,
		msg:"数据获取成功"
	}
};
